package com.xvxingan.base.entity;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
/**
 * 
 * @Description: 基于反射的通用的equals,hashCode,toString
 * @Date 2011-9-23
 */
public abstract class BaseObject implements Serializable {

	private static final long serialVersionUID = -5652459538940222393L;

	protected Long id;
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public boolean equals(final Object other) {
		return EqualsBuilder.reflectionEquals(this, other);
	}

	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

 }
